1. Field of the Invention
The present invention relates to an apparatus, a method, and a non-transitory computer-readable medium.
2. Description of the Related Art
A technique of automatically insetting an image into a slot of a template and completing a layout image has recently been known in photo printing or video clip creation software. Also known is a technique of preventing an object as a target region from not being output when trimming a region to be arranged in a template frame out of an image to be arranged on a template.
Japanese Patent Laid-Open No. 2007-26246 has the following arrangement. A main object region set on a still image and a target point for deciding the center of the main object are set. In a layout frame, a reference point that is made to match the target point when insetting the still image is set. The ratio of the distance from the reference point to the layout frame to that from the target point to the outline of the still image is obtained. The maximum value of the ratio is defined as a first parameter. In addition, the ratio of the distance from the reference point to the layout frame to that from the target point to the outline of the main object region is obtained. The minimum value of the ratio is defined as a second parameter. When the first parameter is larger than the second parameter, a blank region occurs, or the main object is placed off the album image. Hence, inset of the still image is prohibited.
Japanese Patent Laid-Open No. 2007-26246 describes a technique of automatically deciding the trimming position in consideration of the position of a target region such as a person. In this technique, even when the position of the target region is taken into consideration, and a satisfactory arrangement can be obtained, an unnecessary object such as a passer or a user's finger on the camera is not taken into consideration at all.
When processing is performed for an image 3402 shown in FIG. 30 using the technique described in Japanese Patent Laid-Open No. 2007-26246, a region 3406 of an accidentally included passer is specified together with target regions 3404 and 3405 such as the faces of user's family. In this case, the trimming region is represented by 3409 on the coordinate system of the image 3402. Then, an image 3407 is obtained by performing trimming of the image 3402 using the region 3409. The target regions 3404 and 3405 are displayed in the image 3407 after trimming. However, since the region 3406 corresponding to the passer is displayed together, it may be impossible to output an output target region desired by the user.